package com.fanjun.learning.multithread.Thread_Specific_Storage_Pattern;

import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;

/**
 * Created by fanjun on 16/10/17.
 */
public class TSLog {
    private PrintWriter printWriter = null;

    public TSLog(String fileName){
        try {
            printWriter = new PrintWriter(new FileWriter(fileName));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public void printLog(String s){
        printWriter.println(s);
    }

    public void close(){
        printWriter.close();
    }
}
